package annotation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

@Service("newZoo1Id")
@Scope("prototype") //表示非单例
public class Zoo1 {

    @Autowired
    private Tiger tiger;

    @Autowired
    private Monkey monkey;

    public void say() {
        tiger.say();
        monkey.say();
    }

}
